<?php use_helper('Date'); $sf_user->setCulture('ru_RU'); ?>

<h2 class="block_title_red">
<div class="btrdiv  <?php echo($sf_request->getParameter('ukr'))?'':'active'?>" id="general_all_news"><a href="javascript:;" onclick="switchtab(this,'news')">Новости</a></div>
<div class="btrdiv  <?php echo($sf_request->getParameter('ukr'))?'active':''?>" id="general_ukr_news"><a href="javascript:;" onclick="switchtab(this,'news')">Новости Украина</a></div>
</h2>

<?php slot('related')?>
<?php include_component('releases','last_releases',array('howmuch'=>3)) ?>
<?php include_component('articles','last_articles',array('howmuch'=>3)) ?>
<?php end_slot();?>

<!-- Show general news  -->
	<div class="list_general_news" <?php echo($sf_request->getParameter('ukr'))?'style="display:none;"':''?>>
		<?php if ($pager->haveToPaginate()): ?>
			<?php include_partial($sf_context->getModuleName().'/pagination',array('pager'=>$pager))?>
		<?php endif;?>
		
		<?php
		$news = $pager->getResults();
		if( !empty($news) ):?>
			<?php foreach($news as $news_item):?>
					<div class="article">
						<?php if($news_item['image']):?>
							<?php echo link_to('<img title="'.$news_item['image_text'].'" src="/uploads/news/thumbnail_70_70/'.$news_item['image'].'"/>','news_view',$news_item)?>
						<?php endif;?>
						<?php echo link_to($news_item['title'],'news_view',$news_item,'class="entity_header"')?><br/>
						<span class="cat_link">
							<?php echo format_datetime($news_item['updated_at'],'f')?>
						</span><br/>
						<span class="short_description"><?php echo $news_item['short']?></span><br/>
					</div>
			<?php endforeach;?>
		<?php else:?>
		no general news
		<?php endif;?>
		
		<?php if ($pager->haveToPaginate()): ?>
			<?php include_partial($sf_context->getModuleName().'/pagination',array('pager'=>$pager))?>
		<?php endif;?>
	</div>

<!-- Show ukrainian news  -->
	<div class="list_ukr_news" <?php echo($sf_request->getParameter('ukr'))?'':'style="display:none;"'?>>
		<?php if ($pager_ukr->haveToPaginate()): ?>
			<?php include_partial($sf_context->getModuleName().'/pagination_ukr',array('pager'=>$pager_ukr))?>
		<?php endif;?>
	
		<?php
		$news = $pager_ukr->getResults();
		if( !empty($news) ):?>
			<?php foreach($news as $news_item):?>
					<div class="article">
						<?php if($news_item['image']):?>
							<?php echo link_to('<img title="'.$news_item['title'].'" src="/uploads/news/thumbnail_70_70/'.$news_item['image'].'"/>','news_view',$news_item)?>
						<?php endif;?>
						<?php echo link_to($news_item['title'],'news_view',$news_item,'class="entity_header"')?><br/>
						<span class="cat_link">
							<?php echo format_datetime($news_item['updated_at'],'f')?>
						</span><br/>
						<span class="short_description"><?php echo $news_item['short']?></span><br/>
					</div>
			<?php endforeach;?>
		<?php else:?>
		no general news
		<?php endif;?>
	
		<?php if ($pager_ukr->haveToPaginate()): ?>
			<?php include_partial($sf_context->getModuleName().'/pagination_ukr',array('pager'=>$pager_ukr))?>
		<?php endif;?>
	</div>

<?php include_component('banners','get468x60')?>